//
//  QLMBankInfoInvoiceCell.m
//  Xiaomakuaixiu
//
//  Created by 邬俊涛 on 2018/3/10.
//  Copyright © 2018年 hwd. All rights reserved.
//

#import "QLMBankInfoInvoiceCell.h"

@implementation QLMBankInfoInvoiceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (CGFloat)autoChangeHeightWithLabel:(Vertical *)textLabel{
    CGSize constraint = CGSizeMake(kScreen_width-100-20,CGFLOAT_MAX);
    CGRect size = [textLabel.text boundingRectWithSize:constraint
                                               options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingTruncatesLastVisibleLine)
                                            attributes:@{NSFontAttributeName:textLabel.font}
                                               context:nil];
    
    CGFloat textHeight = size.size.height;
    return textHeight;
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *identifiew=@"QLMBankInfoInvoiceCellId";
    QLMBankInfoInvoiceCell *cell=[tableView dequeueReusableCellWithIdentifier:identifiew];
    if (cell==nil) {
        cell=[[[NSBundle mainBundle] loadNibNamed:@"QLMBankInfoInvoiceCell" owner:nil options:nil] firstObject];
        cell.suihaoTipLabel.font=[UIFont systemFontOfSize:12];
        cell.shuihaoValueLabel.font=[UIFont systemFontOfSize:16];
        cell.shuihaoValueLabel.verticalAlignment=VerticalAlignmentMiddle;
    }
    return cell;
}

@end
